javascript replace multiple spaces with single space

421

replace multiple spaces with single space javascript -

string = string.replace(/\s\s+/g, ' ');

Comments

Submit
0 Comments